package unmsm.eapisw.taller.srh_persistencia.dao.impl;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import unmsm.eapisw.taller.srh_persistencia.dao.IHotelDAO;
import unmsm.eapisw.taller.srh_persistencia.modelo.Hotel;

public class HotelDAO implements IHotelDAO{
	private SessionFactory sessionFactory;

	/**
	 * Get Hibernate Session Factory
	 * 
	 * @return SessionFactory - Hibernate Session Factory
	 */
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	/**
	 * Set Hibernate Session Factory
	 * 
	 * @param SessionFactory
	 *            - Hibernate Session Factory
	 */
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	public void addHotel(Hotel ho) {
		getSessionFactory().getCurrentSession().save(ho);

	}

	public void updateHotel(Hotel ho) {
		getSessionFactory().getCurrentSession().update(ho);
		// TODO Auto-generated method stub
		
	}

	public void deleteHotel(Hotel ho) {
		// TODO Auto-generated method stub
		
	}

	public Hotel getHotelById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Hotel> getHotel() {
		// TODO Auto-generated method stub
		return null;
	}

}
